package com.qst.service.impl;

import com.qst.dao.HouselistMapper;
import com.qst.pojo.Houselist;
import com.qst.service.HouselistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service public class HouselistServiceImpl implements HouselistService {

	 @Autowired private HouselistMapper houselistMapper;

	 @Override public List<Houselist> selectAll(String status) {
		  List<Houselist> houselist = houselistMapper.selectAll(status);
		  return houselist;
	 }

	 @Override public List<Houselist> selectAllByUserId(Integer userid, String status) {
		  return houselistMapper.selectAllByUserId(userid, status);
	 }

	 @Override public Houselist findhouseid(String houseid) {
		  Houselist houselist = houselistMapper.findhouseid(houseid);
		  return houselist;
	 }

	 @Override public void inserthouse(Houselist houselist) {
		  // TODO Auto-generated method stub
		  houselistMapper.inserthouse(houselist);
	 }

	 @Override public void deletehouse(int id) {
		  // TODO Auto-generated method stub
		  houselistMapper.deletehouse(id);
	 }

	 @Override public Houselist findhouseidupdate(Houselist houselist) {
		  Houselist list = houselistMapper.findhouseidupdate(houselist);
		  return list;
	 }

	 @Override public void updatehouse(Houselist houselist) {
		  houselistMapper.updatehouse(houselist);

	 }

	 @Override public Houselist findid(int id) {
		  Houselist list = houselistMapper.findid(id);
		  return list;
	 }

	 @Override public void updatehousestatus(Houselist houselist) {
		  // TODO Auto-generated method stub
		  houselistMapper.updatehousestatus(houselist);
	 }

	 @Override public void deletehousebyhouseid(String house_id) {
		  houselistMapper.deletehousebyhouseid(house_id);

	 }

}
